Creating Reproducible R Workflows in Quarto

About Me

PhD Candidate in the SCCJ at UNO

Research background focuses on biopsychosocial criminology and quantitative methods

Dissertation: A Combined Theory Data-Driven Approach to Predicting Delinquent Risk in the Future of Families and Child Wellbeing Study

Gameplan


  • Talk Quarto


  • Show Quarto


  • Do Quarto

What is Quarto?


Quarto is an open-source scientific and technical publishing system built on Pandoc.


Quarto evolved from RMarkdown in order to integrate other coding languages (e.g., Python, Julia, Observable, etc.).

Why should academics use Quarto?


It’s free! And it’s built with reproducibility in mind.

It makes collaboration and peer-reviewing a billion times easier!

Add text in-between code-chunks to explain your steps ( e.g., justifying your statistical assumptions).

Create presentation that make your teaching or presentations interactive.

Let’s look at some Quarto features

Interactive Presentations

Quarto Revealjs Basics

index.qmd

---
title: "Basic Revealjs"
format: revealjs
editor: visual
---

## Quarto

Quarto enables you to weave together content and executable code into a finished presentation.

## Bullets

When you click the **Render** button a document will be generated that includes:

-   Content authored with markdown
-   Output from executable code

## Code

When you click the **Render** button a presentation will be generated that includes both content and the output of embedded code. You can embed code like this:

```{r}
1 + 1
```


:::

Interactive Data Vizualizations

{plotly}

library(plotly)
library(palmerpenguins)


plot_ly(penguins,
        x=~bill_length_mm,
        y=~bill_depth_mm,
        z=~body_mass_g,
        color = ~species)

Interactive Data Vizualizations

{ggiraph}

library(ggplot2)
library(ggiraph)
library(palmerpenguins)

interactplot <- ggplot(data = penguins,
                       aes(x = flipper_length_mm,
                           y = body_mass_g)) +
  geom_point_interactive(aes(color = species,
                             tooltip = species, 
                             data_id = species)) +
  theme_minimal()


girafe(ggobj = interactplot)

Quarto CVs

Workshop Time!

Git & GitHub


Git is a open-source version control system.


GitHub is cloud platform for hosting and sharing projects.


Clone GitHub Repo


Head here and then navigate to the green box that says “Code”.


Workshop Time!


1.) Open the workshop folder.


2.) Click on “quartobasics.qmd” and follow the directions.


3.) Click “reproworkflow.qmd” and follow along.


Resources


posit::conf(2024)


Tutorial: Hello, Quarto


R Ladies


R for Data Science Online Learning Community


Questions?